package com.wangshang.general.depot.po;

/**
 * AbstractDepotInfoId entity provides the base persistence definition of the
 * DepotInfoId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractDepotInfoId implements java.io.Serializable {

	// Fields

	private String commdityMainId;
	private Long placeId;

	// Constructors

	/** default constructor */
	public AbstractDepotInfoId() {
	}

	/** full constructor */
	public AbstractDepotInfoId(String commdityMainId, Long placeId) {
		this.commdityMainId = commdityMainId;
		this.placeId = placeId;
	}

	// Property accessors

	public String getCommdityMainId() {
		return this.commdityMainId;
	}

	public void setCommdityMainId(String commdityMainId) {
		this.commdityMainId = commdityMainId;
	}

	public Long getPlaceId() {
		return this.placeId;
	}

	public void setPlaceId(Long placeId) {
		this.placeId = placeId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractDepotInfoId))
			return false;
		AbstractDepotInfoId castOther = (AbstractDepotInfoId) other;

		return ((this.getCommdityMainId() == castOther.getCommdityMainId()) || (this
				.getCommdityMainId() != null
				&& castOther.getCommdityMainId() != null && this
				.getCommdityMainId().equals(castOther.getCommdityMainId())))
				&& ((this.getPlaceId() == castOther.getPlaceId()) || (this
						.getPlaceId() != null
						&& castOther.getPlaceId() != null && this.getPlaceId()
						.equals(castOther.getPlaceId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getCommdityMainId() == null ? 0 : this.getCommdityMainId()
						.hashCode());
		result = 37 * result
				+ (getPlaceId() == null ? 0 : this.getPlaceId().hashCode());
		return result;
	}

}